package com.david.cms.model;

/**
 * 
 */

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @description 区县
 * @author David
 * @version 2013-5-13
 */
@Entity
@Table(name = "t_province")
public class Province {
	/**
	 * ID
	 */
	private String id;
	/**
	 * 区县名称
	 */
	private String name;
	/**
	 * 省市
	 */
	private City city;
	/**
	 * 备注
	 */
	private String remak;
	@Id   
	@GenericGenerator(name = "generator", strategy = "uuid.hex")   
	@GeneratedValue(generator = "generator")   
	@Column(name = "id", length = 50)  
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@ManyToOne
	@JoinColumn(name = "city")
	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}
	@Column(name = "remark")
	public String getRemak() {
		return remak;
	}

	public void setRemak(String remak) {
		this.remak = remak;
	}

}
